package com.gzhryc.net_marketing.cloud.business.dao.db;

import java.util.Date;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.net_marketing.cloud.business.dao.enums.PayGoodsOrderEnum;
import com.gzhryc.net_marketing.core.enums.EGoodsClassify;
import com.gzhryc.net_marketing.core.enums.EReceiveGoodsType;
import com.gzhryc.net_marketing.core.enums.GoodsOrderEnum;
import com.gzhryc.shared_device.base.enums.EPayType;

@Table(name = "pay_goods_order")
public class PayGoodsOrder {

	@Id(auto = false)
	@Column(name="trade_no",notNull = true,length = 64)
	protected String tradeNo;

	@Column(name="business_type",notNull = true,defVal = "1")
	protected Integer businessType;

	@Column(name = "apply_id")
	protected Long applyId;

	@Column(name = "member_id",notNull = true)
	protected Long memberId;

	@Column(name = "member_nickname",note = "会员昵称")
	protected String memberNickname;

	@Column(name = "member_phone",note = "会员手机号")
	protected String memberPhone;
	
	@Column(name = "project_id",notNull = true,note = "项目ID")
	protected Long projectId;

	@Column(name = "goods_id",notNull = true)
	protected Long goodsId;

	@Column(name = "goods_code")
	protected String goodsCode;

	@Column(name = "goods_name",notNull = true,length = 64,note = "商品名称")
	protected String goodsName;

	@Column(name = "goods_space_id",note="规格参数ID")
	protected Long goodsSpaceId;

	@Column(name = "goods_space_name",note="规格参数名称")
	protected String goodsSpaceName;

	@Column(name="classify",notNull = true,defVal = "1",note = "商品类型，1：实物，2：虚拟")
	protected Integer classify;

	@Column(name="type_codes",length = 255)
	protected String typeCodes;

	@Column(name="type_names",length = 255)
	protected String typeNames;

	@Column(name = "goods_img",length = 128)
	protected String goodsImg;

	@Column(name = "goods_count",notNull = true,defVal = "1",note="商品数量")
	protected Integer goodsCount;

	@Column(name = "goods_money",notNull = true,defVal = "0",note="单个商品价格")
	protected Integer goodsMoney;

	@Column(length = 128,note = "客户备注")
	protected String note;

	@Column(name = "money",notNull = true,defVal = "0",note="订单总金额，（单个商品零售价格（团拼价格）x数量+物流费）")
	protected Integer money;

	@Column(name = "logistics_money",notNull = true,defVal = "0",note = "物流费用，单位：分")
	protected Integer logisticsMoney;

	@Column(name = "pay_money",notNull = true,defVal = "0", note="实际支付金额")
	protected Integer payMoney;

	@Column(name = "wallet_money",notNull = true,defVal = "0",note="钱包余额")
	protected Integer walletMoney;

	@Column(name = "virtual_money",notNull = true,defVal = "0",note="积分")
	protected Integer virtualMoney;

	@Column(name = "coupon_money",defVal = "0", note = "优惠金额")
	protected Integer couponMoney;

	@Column(name = "coupon_content",length = 1024,note="优惠券内容")
	protected String couponContent;

	@Column(name = "pay_type")
	protected Integer payType;

	@Column(notNull = true,defVal = "1")
	protected Integer state;

	@Column(name="supply_state",notNull = true,defVal = "1",note="供货状态")
	protected Integer supplyState;

	@Column(name="lock_state",notNull = true,defVal = "1",note = "用于数据库行锁定")
	protected Integer lockState;

	@Column(name = "mail_address_id")
	protected Long mailAddressId;

	@Column(name = "receive_name")
	protected String receiveName;

	@Column(name = "receive_phone")
	protected String receivePhone;

	@Column(name = "receive_province",note="收货地址省份")
	protected String receiveProvince;

	@Column(name = "receive_address", length = 255)
	protected String receiveAddress;

	//物流信息
	@Column(name = "logistics_company_id",note="物流公司ID")
	protected String logisticsCompanyId;

	@Column(name = "logistics_company",note="物流公司")
	protected String logisticsCompany;

	@Column(name = "logistics_trade_no",length = 64,note="物流单号")
	protected String logisticsTradeNo;

	//发货信息
	@Column(name="deliver_goods_note",length = 255,note = "发货备注")
	protected String deliverGoodsNote;

	@Column(name = "deliver_goods_date",note="发货时间")
	protected Date deliverGoodsDate;

	//收货方式
	@Column(name = "receive_goods_type",note="收货类型，1:系统默认，2：物流查询，3：用户确认，4：客服确认")
	protected Integer receiveGoodsType;

	@Column(name = "receive_goods_date",note="收货时间")
	protected Date receiveGoodsDate;

	@Column(name = "close_reason", length = 64,note = "关闭原因")
	protected String closeReason;

	@Column(name = "update_date", autoUpdateTime = true)
	protected Date updateDate;

	@Column(name = "create_date")
	protected Date createDate;

	public String getTradeNo() {
		return tradeNo;
	}

	public void setTradeNo(String tradeNo) {
		this.tradeNo = tradeNo;
	}

	public Long getApplyId() {
		return applyId;
	}

	public void setApplyId(Long applyId) {
		this.applyId = applyId;
	}

	public Integer getBusinessType() {
		return businessType;
	}

	public void setBusinessType(Integer businessType) {
		this.businessType = businessType;
	}

	public Long getMemberId() {
		return memberId;
	}

	public void setMemberId(Long memberId) {
		this.memberId = memberId;
	}

	public String getMemberNickname() {
		return memberNickname;
	}

	public void setMemberNickname(String memberNickname) {
		this.memberNickname = memberNickname;
	}

	public String getMemberPhone() {
		return memberPhone;
	}

	public void setMemberPhone(String memberPhone) {
		this.memberPhone = memberPhone;
	}

	public Long getProjectId() {
		return projectId;
	}

	public void setProjectId(Long projectId) {
		this.projectId = projectId;
	}

	public Long getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(Long goodsId) {
		this.goodsId = goodsId;
	}

	public Long getGoodsSpaceId() {
		return goodsSpaceId;
	}

	public void setGoodsSpaceId(Long goodsSpaceId) {
		this.goodsSpaceId = goodsSpaceId;
	}

	public String getGoodsSpaceName() {
		return goodsSpaceName;
	}

	public void setGoodsSpaceName(String goodsSpaceName) {
		this.goodsSpaceName = goodsSpaceName;
	}

	public String getGoodsCode() {
		return goodsCode;
	}

	public void setGoodsCode(String goodsCode) {
		this.goodsCode = goodsCode;
	}

	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	public Integer getClassify() {
		return classify;
	}

	public void setClassify(Integer classify) {
		this.classify = classify;
	}

	public String getTypeCodes() {
		return typeCodes;
	}

	public void setTypeCodes(String typeCodes) {
		this.typeCodes = typeCodes;
	}

	public String getTypeNames() {
		return typeNames;
	}

	public void setTypeNames(String typeNames) {
		this.typeNames = typeNames;
	}

	public String getGoodsImg() {
		return goodsImg;
	}

	public void setGoodsImg(String goodsImg) {
		this.goodsImg = goodsImg;
	}

	public Integer getGoodsMoney() {
		return goodsMoney;
	}

	public void setGoodsMoney(Integer goodsMoney) {
		this.goodsMoney = goodsMoney;
	}

	public Integer getGoodsCount() {
		return goodsCount;
	}

	public void setGoodsCount(Integer goodsCount) {
		this.goodsCount = goodsCount;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public Integer getLogisticsMoney() {
		return logisticsMoney;
	}

	public void setLogisticsMoney(Integer logisticsMoney) {
		this.logisticsMoney = logisticsMoney;
	}

	public Integer getPayType() {
		return payType;
	}

	public void setPayType(Integer payType) {
		this.payType = payType;
	}

	public Integer getMoney() {
		return money;
	}

	public void setMoney(Integer money) {
		this.money = money;
	}

	public String getCouponContent() {
		return couponContent;
	}

	public void setCouponContent(String couponContent) {
		this.couponContent = couponContent;
	}

	public Integer getCouponMoney() {
		return couponMoney;
	}

	public void setCouponMoney(Integer couponMoney) {
		this.couponMoney = couponMoney;
	}

	public Integer getWalletMoney() {
		return walletMoney;
	}

	public void setWalletMoney(Integer walletMoney) {
		this.walletMoney = walletMoney;
	}

	public Integer getVirtualMoney() {
		return virtualMoney;
	}

	public void setVirtualMoney(Integer virtualMoney) {
		this.virtualMoney = virtualMoney;
	}

	public Integer getPayMoney() {
		return payMoney;
	}

	public void setPayMoney(Integer payMoney) {
		this.payMoney = payMoney;
	}

	public Long getMailAddressId() {
		return mailAddressId;
	}

	public void setMailAddressId(Long mailAddressId) {
		this.mailAddressId = mailAddressId;
	}

	public String getReceiveName() {
		return receiveName;
	}

	public void setReceiveName(String receiveName) {
		this.receiveName = receiveName;
	}

	public String getReceivePhone() {
		return receivePhone;
	}

	public void setReceivePhone(String receivePhone) {
		this.receivePhone = receivePhone;
	}

	public String getReceiveProvince() {
		return receiveProvince;
	}

	public void setReceiveProvince(String receiveProvince) {
		this.receiveProvince = receiveProvince;
	}

	public String getReceiveAddress() {
		return receiveAddress;
	}

	public void setReceiveAddress(String receiveAddress) {
		this.receiveAddress = receiveAddress;
	}

	public String getLogisticsCompanyId() {
		return logisticsCompanyId;
	}

	public void setLogisticsCompanyId(String logisticsCompanyId) {
		this.logisticsCompanyId = logisticsCompanyId;
	}

	public String getLogisticsCompany() {
		return logisticsCompany;
	}

	public void setLogisticsCompany(String logisticsCompany) {
		this.logisticsCompany = logisticsCompany;
	}

	public String getLogisticsTradeNo() {
		return logisticsTradeNo;
	}

	public void setLogisticsTradeNo(String logisticsTradeNo) {
		this.logisticsTradeNo = logisticsTradeNo;
	}

	public String getDeliverGoodsNote() {
		return deliverGoodsNote;
	}

	public void setDeliverGoodsNote(String deliverGoodsNote) {
		this.deliverGoodsNote = deliverGoodsNote;
	}

	public Date getDeliverGoodsDate() {
		return deliverGoodsDate;
	}

	public void setDeliverGoodsDate(Date deliverGoodsDate) {
		this.deliverGoodsDate = deliverGoodsDate;
	}

	public Integer getReceiveGoodsType() {
		return receiveGoodsType;
	}

	public void setReceiveGoodsType(Integer receiveGoodsType) {
		this.receiveGoodsType = receiveGoodsType;
	}

	public Date getReceiveGoodsDate() {
		return receiveGoodsDate;
	}

	public void setReceiveGoodsDate(Date receiveGoodsDate) {
		this.receiveGoodsDate = receiveGoodsDate;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Integer getSupplyState() {
		return supplyState;
	}

	public void setSupplyState(Integer supplyState) {
		this.supplyState = supplyState;
	}

	public Integer getLockState() {
		return lockState;
	}

	public void setLockState(Integer lockState) {
		this.lockState = lockState;
	}

	public String getCloseReason() {
		return closeReason;
	}

	public void setCloseReason(String closeReason) {
		this.closeReason = closeReason;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getGoodsMoneyStr() {
		return NumberTools.getMoneyStr(this.goodsMoney);
	}

	public String getMoneyStr() {
		return NumberTools.getMoneyStr(this.money);
	}

	public String getPayMoneyStr() {
		return NumberTools.getMoneyStr(this.payMoney);
	}

	public String getWalletMoneyStr() {
		return NumberTools.getMoneyStr(this.walletMoney);
	}

	public String getCouponMoneyStr() {
		return NumberTools.getMoneyStr(this.couponMoney);
	}

	public String getLogisticsMoneyStr() {
		return NumberTools.getMoneyStr(logisticsMoney);
	}

	public String getPayTypeName(){
		return EPayType.note(this.payType);
	}

	public String getBusinessTypeName(){
		return PayGoodsOrderEnum.BusinessType.note(this.businessType);
	}

	public String getStateName(){
		return GoodsOrderEnum.State.note(this.state);
	}

	public String getSupplyStateName(){
		return GoodsOrderEnum.SupplyState.note(this.supplyState);
	}

	public String getReceiveGoodsTypeName(){
		return EReceiveGoodsType.note(this.receiveGoodsType);
	}

	public String getClassifyName(){
		return EGoodsClassify.note(this.classify);
	}

}
